// 汽车美容相关请求
import request from '../request.js';
import {
	getbeautyURL,
	getbeautyListURL,
	evaluationURL,
	orderURL,
	buyURL,
	payURL,
	storeHomeURL,
	goodListURL
} from "../urls.js";
export default {
	// 汽车美容按类型店铺数据接口
	getBeautyNavigation(id) {
		return request({
			url: getbeautyURL + id,
			method: 'GET',
		})
	},
	//按类型分类的店铺数据接口
	getBeautyGoodList(id) {
		return request({
			url: getbeautyListURL + id,
			method: 'GET',
		})
	},
	//店铺详情
	getStoreHome(data) {
		return request({
			url: storeHomeURL + data.id + '/' + data._id + '?lng=' + data.lng + '&lat=' + data.lat,
			method: 'GET',
		})
	},
	//评论
	getEvaluation(id) {
		return request({
			url: evaluationURL,
			method: 'GET',
		})
	},
	//添加订单
	postAddOrder(data) {
		return request({
			url: orderURL,
			method: 'post',
			data
		})
	},
	//购买
	postBuy(data) {
		return request({
			url: buyURL,
			method: 'post',
			data
		})
	},
	//支付
	posPay(data) {
		return request({
			url: payURL,
			method: 'post',
			data
		})
	},
	getGoodList() {
		return request({
			url: goodListURL,
			method: 'get',
		})
	}
}
